using System;
using System.Collections.Generic;
using System.Linq;
using System.ComponentModel.DataAnnotations;

namespace secret_server.Models
{
    public class Player
    {
        public Guid Id { get; set; }

        public DateTime CreateTime { get; set; }

        public virtual void Created() {
            CreateTime = DateTime.Now;
        }

        public string IpAddress { get; set; }

        [DisplayFormat(DataFormatString = "{0:yyyy-MM-dd}", ApplyFormatInEditMode = true)]
        public DateTime LastLoginTime { get; set; }

        public string SupportNickname { get; set; }
        public string SupportAvatar { get; set; }

        public string WechatUserId { get; set; }
        public string WechatToken { get; set; }
        public int WechatExpireTime { get; set; }

        public string QQUserId { get; set; }
        public string QQToken { get; set; }
        public int QQExpireTime { get; set; }

        public string WeiboUserId { get; set; }
        public string WeiboToken { get; set; }
        public int WeiboExpireTime { get; set; }

        public virtual IEnumerable<WorldScene> WorldScenes { get; set; }
    }
}
